<?php
/**
   {products list=array_of_products [columns=num_of_columns_in_table]}
*/

function smarty_function_products($params)
{
  global $smarty;

  $smarty->assign('products', $params['list']);

  $columns = 4;
  if (array_key_exists('columns',$params)) {
      $columns = $params['columns'];
  }
  $smarty->assign('VIEW_PRODUCTS_COLS', $columns);

  return $smarty->fetch("components/products.tpl");
}


?>